<template>
  <div>
    <n-tabs type="line" :size="Obj.size" @update:value="update">
      <n-tab-pane
        :name="item.name"
        :tab="item.tab"
        v-for="(item, index) in TabsList"
        :key="index"
      >
      </n-tab-pane>
    </n-tabs>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
  name: 'Tbas',
  props: {
    TabsList: {
      type: Array,
    },
    size: {
      type: String,
    },
  },
  setup(props, { emit }) {
    const Obj = props;
    const update = (row) => {
      emit('update', row);
    };
    return {
      Obj,
      update, //组件返回事件
    };
  },
});
</script>

<style>
</style>